//
//  BK_ReturnGoods_Progress_Query_Cell.m
//  bestkeep
//
//  Created by TOPTEAM on 2017/5/2.
//  Copyright © 2017年 utouu. All rights reserved.
//

#import "BK_ReturnGoods_Progress_Query_Cell.h"
#import "BK_OD_Tool.h"
@implementation BK_ReturnGoods_Progress_Query_Cell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}



-(id)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _applyGoodsImage = [UIImageView new];
        _applyGoodsImage.layer.borderWidth = 0.3;
        _applyGoodsImage.layer.borderColor = RGB(242, 242, 242).CGColor;
        _applyGoodsImage.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_applyGoodsImage];
        
        [_applyGoodsImage mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self.contentView.mas_top).offset(10);
            make.bottom.mas_equalTo(self.contentView.mas_bottom).offset(-10);
            make.left.mas_equalTo(self.contentView.mas_left).offset(ApplicationBackGauge);
            make.width.mas_equalTo(@(80));
            
        }];
        
        _applyGoodsDetail = [UILabel new];
        _applyGoodsDetail.textColor = [UIColor blackColor];
        _applyGoodsDetail.font = [UIFont systemFontOfSize:14.0];
        _applyGoodsDetail.numberOfLines = 1;
        _applyGoodsDetail.text = @" --- ";
        [self.contentView addSubview:_applyGoodsDetail];
        
        [_applyGoodsDetail mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(self.contentView.mas_top).offset(10);
            make.right.mas_equalTo(self.contentView.mas_right).offset(-ApplicationBackGauge);
            make.left.mas_equalTo(_applyGoodsImage.mas_right).offset(10);
        }];
        
        _applyGoodsData = [UILabel new];
        _applyGoodsData.textColor = [UIColor grayColor];
        _applyGoodsData.text = @"数量:";
        _applyGoodsData.font = [UIFont systemFontOfSize:14.0];
        _applyGoodsData.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_applyGoodsData];
        
        [_applyGoodsData mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.top.mas_equalTo(_applyGoodsDetail.mas_bottom).offset(16);
            make.left.mas_equalTo(_applyGoodsImage.mas_right).offset(10);
        }];
        
        _time = [UILabel new];
        _time.textColor = [UIColor grayColor];
        _time.text = @"申请时间:---";
        _time.font = [UIFont systemFontOfSize:12.0];
        _time.backgroundColor = [UIColor whiteColor];
        [self.contentView addSubview:_time];
        
        [_time mas_remakeConstraints:^(MASConstraintMaker *make) {
            make.bottom.mas_equalTo(_applyGoodsImage.mas_bottom).offset(0);
            make.left.mas_equalTo(_applyGoodsImage.mas_right).offset(10);
        }];
        
        
        
    }
    return self;
}
-(void)setModel:(BKMyOrderReturnGoodsProgressModel *)model{
    [_applyGoodsImage load:model.itemGoodsImg];
    _applyGoodsDetail.text = model.goodsName;
    
    
    _time.text = [NSString stringWithFormat:@"申请时间:%@", model.createdDateStr];
    
    _applyGoodsData.text = [NSString stringWithFormat:@"数量:%@",model.goodsAmount];
    
    
}




@end








































